﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace Ponei.Scenes
{
    class Main_Game
    {
        Texture2D cenario;
        Ponei ponei_1, ponei_2;

        public Main_Game(GameWindow Window, ContentManager Content)
        {

            //Criando os dois pôneis
            ponei_1 = new Ponei(Window, Content.Load<Texture2D>("Ponei_1/Ponei_1_novo"), 1);
            ponei_1.Posicao = new Vector2(100, 0);


            ponei_2 = new Ponei(Window, Content.Load<Texture2D>("Ponei_2/Ponei_2_novo"), 2);
            ponei_2.Posicao = new Vector2(700, 0);

            cenario = Content.Load<Texture2D>("background2");

            


        }


        public void Update(GameTime gameTime, KeyboardState keyboard, KeyboardState old_keyboard)
        {
            ponei_1.Update(gameTime, keyboard, old_keyboard);
            ponei_2.Update(gameTime, keyboard, old_keyboard);
        }

        public void Draw(GameTime gameTime, SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(cenario, new Rectangle(0, -600, cenario.Width, cenario.Height), Color.White);
            ponei_1.Draw(gameTime, spriteBatch);
            ponei_2.Draw(gameTime, spriteBatch);
           
        }


    }
}

